<?php

namespace App\Modules\Post\Models;

use App\Models\Cate;

class PostCate extends Cate
{
    protected $modelTitle = '文章分类';
    protected $modelModule = 'post';

    /**
     * 在分类表中sets字段上的设置表单 
     */
    protected $fieldSetsForm = [
        'title'  => [
            'text'  => '设置名称',
            'rules' => 'max:50',
        ],
        'desc'  =>  [
            'textarea' => '设置介绍',
        ],
        'group'  => [
            'switch'  => '允许分组',
            'default' => 1
        ],
        'pos'  => [
            'tags'  => '固定标签',
            'default' => 1
        ],
    ];

    public function getFieldSetsForm()
    {
        return $this->fieldSetsForm;
    }
}
